<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            background-color: red;
           
            width: 300px;
            height: 30px;
            text-align: center;
            margin-top: 10px;
           color:red;
           
            
        }
     
    </style>
</head>
<body>
    <div>一</div>
    <div>二</div>
    <div>三</div>
    <div>四</div>

    <div>五</div>

    <script>
       
       
        var  divs=document.getElementsByTagName("div");
        for(var i=0;i<divs.length;i++){
            divs[i].onclick=function(){
          this.style.color="white";
          alert(nums[si]);

            }
        }





    </script>
    
</body>
</html>